//
//  UIImage+CompressNewImg.h
//  kdz
//
//  Created by 霍雷强 on 2017/5/23.
//  Copyright © 2017年 tng. All rights reserved.
//

#import <UIKit/UIKit.h>

@interface UIImage (CompressNewImg)

+ (UIImage * _Nullable )newTry:(UIImage * _Nullable)image;
+ (void)saveImage:(UIImage * _Nullable)tempImage;
+ (void)saveImageDataToDoc:(NSData * _Nullable)data;
+ (UIImage * _Nullable) imageBlackToTransparent:(UIImage * _Nullable) image;

/** 将图片裁剪rect*/
- (nullable UIImage *)imageCropToRect:(CGRect)rect;

/**
 Returns a grayscaled image.
 */
- (nullable UIImage *)imageByGrayscale;

/**
 Applies a blur effect to this image. Suitable for blur any content.
 */
- (nullable UIImage *)imageByBlurSoft;

/**
 Applies a blur effect to this image. Suitable for blur any content except pure white.
 (same as iOS Control Panel)
 */
- (nullable UIImage *)imageByBlurLight;

/**
 Applies a blur effect to this image. Suitable for displaying black text.
 (same as iOS Navigation Bar White)
 */
- (nullable UIImage *)imageByBlurExtraLight;

/**
 Applies a blur effect to this image. Suitable for displaying white text.
 (same as iOS Notification Center)
 */
- (nullable UIImage *)imageByBlurDark;

@end
